.386
CODE SEGMENT USE16
ASSUME CS:CODE,SS:STACK
OLD_INT DW ?,?
NEW16H:
	CMP AH,0
	JE L
	CMP AH,10H
	JE L
	JMP DWORD PTR OLD_INT
L:
	PUSHF
	CALL DWORD PTR OLD_INT
	CMP AL,'A'
	JB L2
	CMP AL,'Z'
	JA L2
	ADD AL,32
L2:
	IRET

START:
	XOR AX,AX
	MOV DS,AX
	MOV AX,DS:[16H*4]
	MOV OLD_INT,AX
	MOV AX,DS:[16H*4+2]
	MOV OLD_INT+2,AX
	CLI
	
	MOV WORD PTR DS:[16H*4],OFFSET NEW16H
	MOV DS:[16H*4+2],CS
	STI
	
	MOV DX,OFFSET START+15
	SHR DX,4
	ADD DX,10H
	MOV AL,0
	MOV AH,31H
	INT 21H
	
CODE ENDS
STACK SEGMENT USE16 STACK
	DB 200 DUP(0)
STACK ENDS
	END START
